//调用接口配置文件
import { request } from 'config/request'
import config from 'config/config'
// 定义接口

//新增
export async function addFun(params) {
    return request({
        url: `${config.aheadPlan}admin/groupMonth/groupMonth/add`,
        method: 'POST',
        data: params,
    });
  };

  //编辑
export async function editFun(params) {
    return request({
        url: `${config.aheadPlan}admin/groupMonth/groupMonth/edit`,
        method: 'POST',
        data: params,
    });
  };

//查询
export async function queryInfo(params) {
    return request({
        url: `${config.aheadPlan}admin/groupMonth/groupMonth/queryById`,
        method: 'GET',
        data: params,
    });
  };

//初始化
export async function monthInit(params) {
  return request({
      url: `${config.aheadPlan}admin/groupMonth/groupMonth/monthInit/${params.month}?status=${params.status}`,
      method: 'GET',
  });
};

//获取图表数据
export async function graphData(params) {
  return request({
      url: `${config.aheadPlan}admin/groupMonth/groupMonth/graphData`,
      method: 'POST',
      data: params,
  });
};

//获取区域树
export async function queryAreaAndCity(params) {
  return request({
      url: `${config.aheadPlan}admin/competitorWeekly/competitorWeekly/queryAreaAndCity`,
      method: 'GET',
      data: params,
  });
};

//修改原因
export async function updateReason(params) {
  return request({
      url: `${config.aheadPlan}admin/monthlyPeport/monthlyPeport/updateReason`,
      method: 'POST',
      data: params,
  });
};